<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
<head>
	<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>设备效率大于90%</title>
</head>

<body>
	<section>
       <div style="width: 100%">
		<table class="table table-bordered table-hover">
			<thead>
				<tr>
					<th>序号</th>
					<th>设备编号</th>
					<th>工作时间(h)</th>
					<th>故障时间(h)</th>
					<th>工作效率(%)</th>
				</tr>
			</thead>
			<tbody>
				<%  int num = (Integer)request.getAttribute("currPage");
	    			int i= (num-1)*5; %>
				<c:forEach items="${list}" var="item"> 
				<tr> 
					<% i++; %>
	    			<td><%= i %></td>
					<td>${item.deviceNum}</td>
					<td>${item.worktime}</td>
					<td>${item.errortime}</td>
					<td>${item.effect}</td>
				</tr>
				</c:forEach>
			</tbody>
			<tfoot>
            <tr>
                <td colspan="5">
                <div class="pagination">
    			<a href="javascript:void(0);" onclick="highEffect(1)">第一页</a>
    			<a href="javascript:void(0);" onclick="highEffect(${currPage-1})">上一页</a>
    			<a href="javascript:void(0);" onclick="highEffect(${currPage+1})">下一页</a>
    			<a href="javascript:void(0);" onclick="highEffect(${totalPage})">最末页</a>
    			${currPage}/${totalPage}页,共${totalRows}个项目
    			</div>
    			</td>
            </tr>
        	</tfoot>
		</table>
		</div>
	</section>
</body>
</html>